package com.atguigu.lease.common.utils;

import java.util.Random;

/**
 * @author kk
 * #date 2024/6/23 22:34
 */
//生成验证码的工具类
public class VerifyCodeUtil {
    public static String verifyCode(Integer len){
        StringBuffer stringBuffer = new StringBuffer();
        for (int i = 0; i < len; i++) {
            stringBuffer.append(new Random().nextInt(10));
        }
        return stringBuffer.toString();
    }
}
